import { Link } from "react-router";

var Fnlist = React.createClass({
	render : function(){
		return (
			<Link href="javascript:;" className="fl_class_bom" to={this.props.url}>
				<span className={"iconfont fl_class_bom_icon "+this.props.data.icon}></span>
				<p>{this.props.data.cont}</p>
			</Link>
		)
	}
})





export default React.createClass({
	getInitialState :function(){
		return { 
			init : [
				{
					url : "",
					icon : "icon-chaye6",
					cont: "普洱茶"
				},
				{
					url : "",
					icon : "icon-chaye5",
					cont: "红茶"
				},
				{
					url : "",
					icon : "icon-chaye4",
					cont: "花草茶"
				},
				{
					url : "",
					icon : "icon-chaye3",
					cont: "茶膏"
				},
				{
					url : "",
					icon : "icon-iconchaye",
					cont: "茶书"
				},
				{
					url : "",
					icon : "icon-chaye2",
					cont: "茶具"
				},
				{
					url : "",
					icon : "icon-chaye1",
					cont: "白茶"
				},
				{
					url : "",
					icon : "icon-chaye",
					cont: "乌龙茶"
				},
				{
					url : "",
					icon : "icon-houdongfangiconfont15",
					cont: "绿茶"
				}
			],
			hg:{
				height : document.body.clientHeight
			}
		}
	},
	componentDidMount: function(){
		 var srl = new IScroll("#warpper",{
			
			probeType: 3
		}); 
	},
	render : function(){
		var newobj = this.state.init.map(function(data,index){
			return <Fnlist data={data} key={index}/>
		})
		
		return (
			<section  id="warpper" >
				<ul>
					<a href="javascript:;" className="fl_class_top">
						<span className="iconfont icon-shoucang fl_class_top_icon"></span>
					<p>品牌推荐</p>
					</a>
					<div>
						 {newobj}
					</div>
					</ul>
			</section>
		)
	}
})
